module storage.attached {
/** * Implemented using different sorts of local storage options available: * localStorage, IndexedDB, WebSQL, who knows what else on IE6. */export interface AttachedStorage {
getKeys(prefix: string, obj: any, callback: (error: Error) => void);
populate(obj: any, callback: (error: Error) => void);
update(obj: any, callback: (error: Error) => void);
}
export interface AttachedStorage2 {
getNames(prefix: string, callback: (error: Error, objectNames: string[]) => void);
populate(name: string, obj: any, callback: (error: Error) => void);
update(name: string, obj: any, callback: (error: Error) => void);
}
export module AttachedStorage {
/** * Detecting an availability of a particular storage. */export interface Initialize {
(uniqueKey: string, callback: (error: Error, storage: AttachedStorage) => void, windowOverride?: typeof window);
}
}
}